package com.dianxin.smartpark.service.common.impl;

import com.chinatelecom.response.common.CommonResponseBody;
import com.dianxin.device.api.device.SmartParkRelationDeviceRpcService;
import com.dianxin.device.api.device.dto.SmartParkRelationDeviceDTO;
import com.dianxin.device.api.device.qo.SmartParkRelationDeviceRpcQO;
import com.dianxin.smartpark.service.common.SmartParkRelationDeviceService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * 业务关联设备Service业务层处理
 * 
 * @author chenjiasong
 * @date 2021-07-19
 */
@Service
public class SmartParkRelationDeviceServiceImpl implements SmartParkRelationDeviceService
{
    private final static Logger logger = LoggerFactory.getLogger(SmartParkRelationDeviceServiceImpl.class);
    @Resource
    private SmartParkRelationDeviceRpcService smartParkRelationDeviceRpcService;

    @Override
    public CommonResponseBody<List<SmartParkRelationDeviceDTO>> selectSmartParkRelationDeviceList(SmartParkRelationDeviceRpcQO qo) throws Exception {
        return smartParkRelationDeviceRpcService.selectSmartParkRelationDeviceList(qo);
    }

    @Override
    public CommonResponseBody<Boolean> insertSmartParkRelationDevice(SmartParkRelationDeviceDTO smartParkRelationDeviceDTO) throws Exception {
        return smartParkRelationDeviceRpcService.insertSmartParkRelationDevice(smartParkRelationDeviceDTO);
    }

    @Override
    public CommonResponseBody<Boolean> deleteSmartParkRelationDevice(SmartParkRelationDeviceDTO smartParkRelationDeviceDTO) throws Exception {
        return smartParkRelationDeviceRpcService.deleteSmartParkRelationDevice(smartParkRelationDeviceDTO);
    }
}
